package main

import (
	"gorm.io/gorm"
	"leading/core"
	"leading/flag"
	"leading/routers"
)

var DB *gorm.DB

func main() {
	core.InitConfig()
	core.InitLogger()
	core.InitGorm()
	core.InitRedis()
	option := flag.Parse()
	if flag.IsStopWeb(&option) {
		flag.SwitchOption(&option)
		return
	}
	routers.InitRouter()
}
